<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>课堂案例</title>
<style>
    .red{
        /* 背景颜色 */
        background-color:red;
        width: 100px;
        height:100px;
    }
    .green{
        background-color: green;
        width: 100px;
        height: 100px;
    }
</style>
</head>
<body>
    <div class="red">红色</div>
    <div class="green">绿色</div>
    <div class="red">红色</div>
</body>
</html>